home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / powerd / examples / Shell.d < prev    next >
Text File  |  2002-10-28  |  511b  |  20 lines

  1. // Silly Shell Example by Wouter van Oortmerssen
  2.  
  3. MODULE    'dos/dos','startup/startup_dos'
  4.  
  5. PROC main()
  6.     DEF    inputstring[80]:STRING,con
  7.     IF con:=Open('con:10/10/600/100/MySillyShell v0.1',MODE_NEWFILE)
  8.         Write(con,'Shell by $#%! in 1991 (and MarK 1999). "BYE" to stop.\n',STRLEN)
  9.         WHILE StrCmp(inputstring,'BYE')=FALSE
  10.             Execute(inputstring,0,con)
  11.             Write(con,'MyPrompt> ',STRLEN)
  12.             ReadEStr(con,inputstring)
  13.             UpperStr(inputstring)
  14.         ENDWHILE
  15.         Close(con)
  16.     ELSE
  17.         PrintFault(IOErr(),'shell')
  18.     ENDIF
  19. ENDPROC
  20.